<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div style="width:100%;text-align:center">
    <!-- 引用网页首页 -->
	{% include 'myapp/menu.html' %}
    <h2>文件上传实例</h2> 
    <!-- 上传的字段一定要写enctype="multipart/form-data" 不然不成功 -->
    <form action="{% url 'doupload' %}" method='POST' enctype="multipart/form-data">
        <!-- 因为post会被拦截，需要加令牌 -->
        {% csrf_token %}
        标题名称：<input type="text" name="title"/><br><br>
        上传文件：<input type="file" name="pic"/><br><br>
        <input type="submit" value="上传" /><br>
    </form>
    </div>
</body>
</html>